package org.simalliance.openmobileapi;

import java.io.IOException;
import java.util.NoSuchElementException;


public class Session {

    private final Reader mReader;

    android.se.omapi.Session mSession;

    Session(android.se.omapi.Session session, Reader paramReader) {
        this.mReader = paramReader;
        this.mSession = session;
    }

    public void close() {
        mSession.close();
    }

    public void closeChannels() {
        mSession.closeChannels();
    }

    public byte[] getATR() {
        return mSession.getATR();
    }

    public Reader getReader() {
        return this.mReader;
    }

    public boolean isClosed() {
        return mSession.isClosed();
    }

    public Channel openBasicChannel(byte[] paramArrayOfbyte) throws IOException {
        return new Channel(mSession.openBasicChannel(paramArrayOfbyte), this);
    }

    public Channel openBasicChannel(byte[] paramArrayOfbyte, byte paramByte) throws IOException {
        return new Channel(mSession.openBasicChannel(paramArrayOfbyte, paramByte), this);
    }

    public Channel openLogicalChannel(byte[] paramArrayOfbyte) throws IOException, IllegalStateException, IllegalArgumentException, SecurityException, NoSuchElementException, UnsupportedOperationException {
        return new Channel(mSession.openLogicalChannel(paramArrayOfbyte), this);
    }

    public Channel openLogicalChannel(byte[] paramArrayOfbyte, byte paramByte) throws IOException {
        return new Channel(mSession.openLogicalChannel(paramArrayOfbyte, paramByte), this);

    }
}

